//
//  TalkTableViewCell.m
//  BasketballClub
//
//  Created by 孙鸿吉 on 16/1/19.
//  Copyright © 2016年 孙鸿吉. All rights reserved.
//

#import "TalkTableViewCell.h"

@implementation TalkTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self allViews];
    }
    return self;
}
- (void)allViews
{
    self.headImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5 * LAYOUT_SIZE, 10 * LAYOUT_SIZE_HEIGHT, 50 * LAYOUT_SIZE, 50 * LAYOUT_SIZE_HEIGHT)];
    self.headImageView.image = [UIImage imageNamed:@"test.jpeg"];
    self.headImageView.layer.cornerRadius = 25;
    self.headImageView.layer.masksToBounds = YES;
    [self.contentView addSubview:self.headImageView];
    
    self.userNickName = [[UILabel alloc]initWithFrame:CGRectMake(60 * LAYOUT_SIZE, 5 * LAYOUT_SIZE_HEIGHT, 200 * LAYOUT_SIZE, 25 * LAYOUT_SIZE_HEIGHT)];
    self.userNickName.textAlignment = 0;
    self.userNickName.font = [UIFont systemFontOfSize:17 * LAYOUT_SIZE];
    [self.contentView addSubview:self.userNickName];
    
    self.timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(60 * LAYOUT_SIZE, 30 * LAYOUT_SIZE_HEIGHT, 200 * LAYOUT_SIZE, 15 * LAYOUT_SIZE_HEIGHT)];
    self.timeLabel.font = [UIFont systemFontOfSize:12 * LAYOUT_SIZE];
    self.timeLabel.textAlignment = 0;
    self.timeLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:self.timeLabel];
    
    self.talkInfoLabel = [[UILabel alloc]initWithFrame:CGRectMake(60 * LAYOUT_SIZE, 45 * LAYOUT_SIZE_HEIGHT, SCREEN_WIDTH - 80 * LAYOUT_SIZE, 25 * LAYOUT_SIZE_HEIGHT)];
    self.talkInfoLabel.numberOfLines = 0;
    self.talkInfoLabel.textAlignment = 0;
    self.talkInfoLabel.textColor = [UIColor grayColor];
    self.talkInfoLabel.font = [UIFont systemFontOfSize:16 * LAYOUT_SIZE];
    [self.contentView addSubview:self.talkInfoLabel];
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
